//
//  LPSanHuiYiKeShowView.m
//  GongXinDangJian
//
//  Created by 刘应平 on 2017/11/30.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "LPSanHuiYiKeShowView.h"

@implementation LPSanHuiYiKeShowView

- (instancetype)initWithFrame:(CGRect)frame title:(NSString *)title
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.sanhuiImageView];
        [self addSubview:self.sanhuiLabel];
        self.sanhuiImageView.sd_layout
        .topEqualToView(self)
        .centerXEqualToView(self)
        .heightIs(90 * [UIScreen zj_screenHScale])
        .widthIs(70 * [UIScreen zj_screenWScale]);
        
        self.sanhuiLabel.sd_layout
        .leftEqualToView(self)
        .rightEqualToView(self)
        .topSpaceToView(self.sanhuiImageView, 15 * [UIScreen zj_screenHScale])
        .heightIs(15 * [UIScreen zj_screenHScale]);
        
        self.sanhuiLabel.text = title;
        
    }
    return self;
}

- (UILabel *)sanhuiLabel{
    if (!_sanhuiLabel) {
        _sanhuiLabel = ({
            UILabel *label = [UILabel new];
            label.textAlignment = NSTextAlignmentCenter;
            label.textColor = [UIColor textBlackColor];
            label.backgroundColor = [UIColor clearColor];
            label.font = LYPBOLDFONT(15);
            label;
        });
    }
    return _sanhuiLabel;
}

- (UIImageView *)sanhuiImageView{
    if (!_sanhuiImageView) {
        _sanhuiImageView = [UIImageView new];
        _sanhuiImageView.image = [UIImage imageNamed:@"sanhuiyike_book"];
        _sanhuiImageView.contentMode = UIViewContentModeCenter;
        
    }
    return _sanhuiImageView;
}

@end
